package com.feiji.manager.usermanager.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonView;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 用户信息表
 * </p>
 *
 * @author xinxin
 * @since 2021-03-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SysUser implements Serializable {

    private static final long serialVersionUID = 1L;

    public interface UserJsonWithOutPassword{

    }

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户名
     */
    @JsonView(UserJsonWithOutPassword.class)
    private String username;

    /**
     * 密码
     */
    private String password;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     *
     */
    private int power;

    /**
     * 组织id
     */
    private Integer orgId;

    /**
     * 0无效用户，1是有效用户
     */
    @JsonView(UserJsonWithOutPassword.class)
    private Integer enabled;

    /**
     * 手机号
     */
    @JsonView(UserJsonWithOutPassword.class)
    private String phone;

    /**
     * email
     */
    @JsonView(UserJsonWithOutPassword.class)
    private String email;


}
